package com.atguigu.practice;

import java.util.Scanner;

public class AppearOnlyOnce {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String string=scanner.next();
        int[] arr=new int[128];
        for(int i=0;i<string.length();i++){
            char ch=string.charAt(i);
            arr[ch]++;
        }
        for(int i=0;i<string.length();i++){
            if(arr[string.charAt(i)]==1){
                System.out.println(string.charAt(i));
                return;
            }
        }
        System.out.println(-1);
    }
}
